package cn.zhanghu;

/**
 * Created by dell on 2017/7/18.
 */
class Fruit {
    {
        System.out.println("this is banana");
        System.out.println("i like Fruit!");
    }
    public Fruit(){
        System.out.println("many type Fruit！");
    }
    public Fruit(String type){
        System.out.println("type is : "+type);
    }
    private void color(String color){
        System.out.print("颜色："+color+" ");
    }
    public void property(String color,String size){
        color(color);
        System.out.println("大小： "+size+"");

    }
}
class Apple extends  Fruit{
    //private Fruit a;

    public void taste(){
        System.out.println("it's very delicious!");
    }
}
public class Plant {
    public static void main(String[] args) {
    Fruit a1 =new Fruit("orange");
    Apple b=new Apple();

    b.property("blue","54");
    b.taste();
}
}